package com.macro.mall.demo2.service.impl;

import com.github.pagehelper.PageHelper;
import com.macro.mall.common.api.CommonPage;
import com.macro.mall.demo2.dao.PmsProductMapperDao;
import com.macro.mall.demo2.service.PmsProductService;
import com.macro.mall.model.PmsProduct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author：贾维斯
 * @Description: 描述
 * @name：PmsProductServiceImpl
 * @Date：2024/10/20 15:40
 */
@Service
public class PmsProductServiceImpl4 implements PmsProductService {
    @Autowired
    private PmsProductMapperDao pmsProductMapper;

    @Override
    public CommonPage<PmsProduct> pmsProductList(Integer brandId, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<PmsProduct> productList = pmsProductMapper.pmsProductList(brandId);
        return CommonPage.restPage(productList);
    }

}
